var times = 0;//加载次数
var pageSize = 4;
var loaded = true;
var name = '';
var repsize =0;
(function(){
    
    LoadData();
    
}());

function LoadData(){

	$.ajax({
        type: "GET",
        dataType: "json",
        url: "lsBTCX",
        data: "name="+name+"&start="+times+"&length="+pageSize,
        success: function(data){
        	var returnFlag = data.returnFlag;
            var list = data.list;
            repsize = data.repsize;
            if(returnFlag){
                $.each(list, function(index, item){
                    $("#searchList").append("<li>"+
                                    "<div class='search-list__item-name fl'>"+
                                        "<i class='iconfont'>&#xe603;</i>"+
                                        "<span>"+item.name+"</span>"+
                                    "</div>"+
                                    "<div class='search-list__item-address fl'>"+
                                        "<div class='address-detail'>"+
                                            "地址：<span>"+item.address+"</span>"+
                                        "</div>"+
                                    "</div>"+
                                    "<div class='search-list__item-phone fr'>"+
                                        "电话：<span>"+item.phone+"</span>"+
                                    "</div>"+
                                "</li>");
                });   
            }
        },
        error: function(msg){
            console.log("加载失败！");
        }
      });
}